#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int n;
    scanf("%d", &n);
    char * str = (char *)malloc(80 * sizeof(char));
    char temp[80];
    scanf("%s", str);
    int len = strlen(str);
    for (int i = 0; i < n - 1; i++)
    {
        scanf("%s", temp);
        if (strlen(temp) > len)
        {
            len = strlen(temp);
            strcpy(str, temp);
        }
    }
    printf("The longest is: %s", str);

    return 0;
}
